package test;

import com.bobo.data.DataStore;

import java.util.Arrays;

public class SHELL {
        public static void main(String[] args) {
        int data[]= DataStore.data;
        px(data);
        System.out.println("args = " + Arrays.toString(data));
    }

        private static void px(int[] data) {
            int leng=data.length;
            int grap=leng;
            while((grap=grap/2)>0){
                for (int i = grap; i <data.length ; i++) {
                    int temp =data[i];
                    int k=i-grap;
                    while (k>=0&&data[k]>temp){
                        int t=data[k];
                        data[k]=data[k+grap];
                        data[k+grap]=t;
                        k=k-grap;
                    }
                    data[k+grap]=temp;
                }
            }

        }
}
